package cn.yerly.sakura.dao.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
/**
 * 订单评价
 * @author yerly
 *
 */
@Entity
public class OrderComment {
	@Id
	private Long id;
	@ManyToOne
	private User user;
	@ManyToOne
	@JoinColumn(name="order_id")
	private Order order;
	@ManyToOne
	private OrderItem orderItem;
	private Integer rank;
	private Integer type;
	private String comment;
	@ManyToOne
	private OrderComment parent;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public OrderItem getOrderItem() {
		return orderItem;
	}

	public void setOrderItem(OrderItem orderItem) {
		this.orderItem = orderItem;
	}

	public Integer getRank() {
		return rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public OrderComment getParent() {
		return parent;
	}

	public void setParent(OrderComment parent) {
		this.parent = parent;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "OrderComment [id=" + id + ", user=" + user + ", order=" + order
				+ ", orderItem=" + orderItem + ", rank=" + rank + ", type="
				+ type + ", comment=" + comment + ", parent=" + parent
				+ ", disabled=" + disabled + "]";
	}

}
